#include "CompositeMesh.h"
#include "os/Graphics/Graphics.h"
#include "os/Graphics/GraphicsStructs.h"


using namespace leo;

CompositeMesh::CompositeMesh(int _posX, int _posY, int _posZ, std::string _fileNamel, leo::Texture::Ptr _tex)
	{
	}

CompositeMesh::~CompositeMesh(void)
	{
	}

void CompositeMesh::OnDraw(leo::Graphics *_graph) const
{
	
	_graph->BindTexture(textura);
	_graph->BindVertexBuffer(const_cast<VertexBuffer<TextureVertex, TEXTURE_VERTEX>*>(vertexBuffer.get()));
	_graph->BindIndexBuffer(const_cast<IndexBuffer*>(indexBuffer.get()));
	_graph->Draw();

}